import CusView from '@/components/Custom/CusView'
import CusSection from '@/components/Custom/CusSection'
import ConView from '@/components/Custom/ConView'

export default {
  components: {
    CusView,
    CusSection,
    ConView
  },
  data() {
    return {
      title: null,
      model: null,
      rules: null,
      loading: false
    }
  },
  mounted() {},
  methods: {
    setApi(api) {
      this.api = api
    },
    getDetail() {
      this.loading = true
      this.api.get(this.id).then(response => {
        this.model = response.data
      }).finally(() => {
        this.loading = false
      })
    },
    handleCallback(data) {
      this.$emit('callback', data)
    },
    handleClose() {
      this.$emit('close')
    }
  }
}
